package com.denlaku.longan.service.impl;

import com.denlaku.longan.anno.RequiredTx;
import com.denlaku.longan.repository.PlaceholderRepository;
import com.denlaku.longan.service.PlaceholderService;
import com.denlaku.longan.vo.Placeholder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tianx
 */
@Service
public class PlaceholderServiceImpl implements PlaceholderService {
	@Autowired
	private PlaceholderRepository placeholderRepository;

	@Override
	@RequiredTx
	public int add(Placeholder placeholder) {
		return placeholderRepository.add(placeholder);
	}

	@Override
	@RequiredTx
	public int delete(Long tenantId, Long dataSetId) {
		return placeholderRepository.delete(tenantId, dataSetId);
	}

	@Override
	public List<Placeholder> list(Long tenantId, Long dataSetId) {
		return placeholderRepository.list(tenantId, dataSetId);
	}

}
